package com.xizi.static1;

public class B extends A {
    public B() {
        System.out.println("构造器 B");
    }

    // 静态变量
    public static String staticField = "静态变量B";
    // 变量
    public String field = "变量B";

    // 静态初始化块
    static {
        System.out.println(staticField);
        System.out.println("静态初始化块B");
    }

    // 初始化块
    {
        System.out.println(field);
        System.out.println("初始化块B");
    }

    public static void main(String[] args) {
        new A();
        System.out.println("======================================");
        new B();
    }
}